import request from '@/utils/request'

// * 添加问卷-保存问卷
export function addSaveSaveQuestion(addData) {
  return request({
    url: '/bt/question/addSaveSaveQuestion',
    method: 'post',
    data: addData
  })
}

// * 请求数据列表
export function pageQuestion(data) {
  return request({
    url: '/bt/question/pageQuestion',
    method: 'post',
    data: data
  })
}

// * 更新问卷是否开启了
export function updateQuestion(data) {
  return request({
    url: '/bt/question/updateQuestion',
    method: 'post',
    data: data
  })
}


//* 问卷详情
export function fetchQuestion(id) {
  return request({
    url: '/bt/question/fetchQuestion',
    method: 'get',
    params: { id }
  })
}

// * 关闭问卷
export function updateCloseQuestion(id) {
  return request({
    url: '/bt/question/updateCloseQuestion',
    method: 'get',
    params: { id }
  })
}

// * 删除问卷
export function deleteQuestion(id) {
  return request({
    url: '/bt/question/deleteQuestion',
    method: 'get',
    params: { id }
  })
}

// * 统计问卷
export function statisticalQuestion(id) {
  return request({
    url: '/bt/question/statisticalQuestion',
    method: 'get',
    params: { id }
  })
}
<<<<<<< HEAD

// * 导出问卷
export function exportQuestion(id) {
  return request({
    url: '/bt/question/exportQuestion',
    method: 'get',
    params: { id }
  })
}
=======
>>>>>>> c12574b6f3b37dc7ea4822ed193ff5025f947b93
